﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NETMovie.UI.WebMVC.Models.MovieModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Add Movie Cast Members
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Add Movie Cast Members</h2>

    <p>
        Use the form below to Add a movie
    </p>

   <% using (Html.BeginForm()) { %>   
        <%: Html.ValidationSummary(true, "Add Movie Cast members not successful. Please correct the errors and try again.") %>

            <fieldset>
      
                <legend>Add Movie Cast Members</legend>


        
       
       <% Html.HiddenFor(m => m.MovieId); %>
  

      
        <div id="editorRows">
          <%
              for (var i = 0; i < Model.CastMembers.Count(); i++ )
              { %>

             <br />
             
          <%= Html.EditorFor(m => m.CastMembers[i]) %>
        
    
            <%  }  %>
             </div>

     </fieldset>
     <input type="submit" value="Save Movie Cast Members" />

<% } %>

</asp:Content>
